<template>
    <view class="text-container">
        <u-text v-for="(item, index) in props.data.data" :key="index" :text="item.textarea" @click="jump(props.data)"></u-text>
    </view>
</template>
  
<script setup lang="ts">
import { computed, onBeforeMount } from "vue";
const props = defineProps({
    // 列表内容
    data: {
        type: Object,
        default: () => { },
    },
    className: {
        type: Object,
        default: () => { },
    },
});

onBeforeMount(() => { });

const jump = (item) => {
    // console.log(item)
    if(item.actionType === 2) {
        uni.switchTab({
            url: '/' + item.miniPage
        })
    }
}

</script>
  
<style lang="scss" scoped>
.text-container{
    padding: 0 12px;
    margin-bottom: 12px;
}
// .image-container {
//     box-sizing: border-box;
//     padding: 0 12px;
//     .imgs{
//         width: 100%;
//         // width: calc(100% - 24px);
//     }
// }
</style>
  